package com.bcqn.dao;

import com.bcqn.model.Message;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface MessageMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKey(Message record);

    List<Message> getMessageByUserId(@Param("triggeredUserId") Long id, @Param("maxId") Long maxId);

    int updateAllRead(Long triggeredUserId);

    Long getCount(Long userId);
}